package com.mobimagic.lockscreen.util;

import android.content.Context;

import com.mobimagic.lockscreen.sdk.ILockScreenCommon;
import com.mobimagic.lockscreen.sdk.ILockScreenHelper;
import com.mobimagic.lockscreen.sdk.LockScreenSDK;

public class SharedPref {
    /**
     * 点击省电列表页 省电王推荐入口的次数
     */
    public static final String CLICK_BATTERY_SHOW_IN_BATTERY_LIST_COUNT = "click_battery_show_in_battery_list_count";
    /**
     * 主页面 省电王推荐展示弹窗时间
     */
    public static final String BATTERY_SHOW_DIALOG_TIME_IN_MAIN = "battery_show_dialog_time_in_main";
    /**
     * 省电列表页面 省电王推荐展示弹窗时间
     */
    public static final String BATTERY_SHOW_DIALOG_TIME_IN_BATTERY_LIST = "battery_show_dialog_time_in_battery_list";
    /**
     * 点击去GP下载省电王(主页面)
     */
    public static final String CLICK_TO_GP_DOWNLOAD_BATTERY_IN_MAIN = "click_to_gp_download_battery_in_main";
    /**
     * 点击去Gp下载省电王（省电列表页）
     */
    public static final String CLICK_TO_GP_DOWNLOAD_BATTERY_IN_BATTERY_LIST = "click_to_gp_download_battery_in_battery_list";
    /**
     * 点击主界面省电王推荐入口的次数
     */
    public static final String CLICK_BATTERY_SHOW_IN_MAIN_COUNT = "click_battery_show_dialog_count";

    /**
     * 保存电池温度
     */
    public static final String SP_KEY_BATTERY_TEMPERATURE = "sp_key_battery_temperature";

    /**
     * 快速充电功能
     */
    public static final String FAST_CHARGE_FUNCTION_SWITCH_STATUS = "fast_charge_function_switch_status";

    /**
     * 是否用户主动关闭快速充电功能
     */
    public static final String IS_USER_TAKE_THE_INITIATIVE_TO_CLOSE = "is_user_take_the_initiative_to_close";

    /**
     * V5控制快速充电引导dialog出现次数
     */
    public static final String FAST_CHARGE_GUIDE_DIALOG_DISPLAY_TIMES = "fast_charge_guide_dialog_display_times";
    /**
     * V5控制快速充电引导dialog上次出现时间
     */
    public static final String FAST_CHARGE_GUIDE_DIALOG_LAST_DISPLAY_TIME = "fast_charge_guide_dialog_last_display_time";
    /**
     * 插拔电源时充电界面显示的时间
     */
    public static final String CONNECT_OR_DISCONNECT_POWER_FAST_CHARGE_LAST_SHOW_TIME = "connect_or_disconnect_power_fast_charge_last_show_time";
    /**
     * 亮屏灭屏情况下触发显示充电屏保的显示时间
     */
    public static final String SCREEN_ON_OR_SCREEN_OFF_FAST_CHARGE_LAST_SHOW_TIME = "screen_on_or_screen_off_fast_charge_last_show_time";
    /**
     * 快速充电功能
     */
    public static final String SP_KEY_FAST_CHARGE_FUNCTION_BOOSTER_TIME = "sp_key_fast_charge_function_booster_time";

    /**
     * 保存重复图片界面是否请求过广告数据
     */
    public static final String SP_KEY_PHOTOSIMILAR_LOADED_AVD = "sp_key_photosimilar_loaded_avd";

    /**
     * 保存进入完成页的时间
     */
    public static final String SP_KEY_ENTER_RESULT_TIME = "sp_key_enter_result_time";

    /**
     * 保存锁屏时清理广告包名的时间
     */
    public static final String SP_KEY_ADV_PKG_CLEAR_TIMESTAMP = "sp_key_adv_pkg_clear_timestamp";

    /**
     * 保存预点击的时间
     */
    public static final String SP_KEY_ADV_PRE_CLICK_TIMESTAMP = "sp_key_adv_pre_click_timestamp";

    /**
     * 保存客户端预点击的次数
     */
    public static final String SP_KEY_ADV_CLIENT_PRECLICK_COUNT = "sp_key_adv_client_preclick_count";

    public static final String MOBILE_CHARGING_LAST_FULL_TIME = "mobile_charging_last_full_time";
    public static final String MOBILE_CHARING_ALARM = "mobile_charing_alarm";

    /**
     * 第一次启动屏保界面判断的条件
     */
    public static final String THE_FIRST_START_CHARGING_CONDITION = "the_first_start_charging_condition";

    public final static ILockScreenCommon getLockScreenCommon() {
        return LockScreenSDK.getInstance().getLockScreenCommon();

    }

    public static final void setInt(Context context, String key, int value) {
        getLockScreenCommon().setInt(context, key, value);

    }

    public static final int getInt(Context context, String key, int defValue) {
        return getLockScreenCommon().getInt(context, key, defValue);
    }

    public static final void setLong(Context context, String key, long value) {
        getLockScreenCommon().setLong(context, key, value);
    }

    public static final long getLong(Context context, String key, long defValue) {
        return getLockScreenCommon().getLong(context, key, defValue);

    }

    public static final void setBoolean(Context context, String key, boolean value) {

        getLockScreenCommon().setBoolean(context, key, value);
    }

    public static final boolean getBoolean(Context context, String key, boolean defValue) {
        return getLockScreenCommon().getBoolean(context, key, defValue);

    }

    public static final String getString(Context context, String key, String defVal) {

        return getLockScreenCommon().getString(context, key, defVal);
    }

    public static final void setString(Context context, String key, String value) {
        getLockScreenCommon().setString(context, key, value);

    }
}
